Sets the pitch (1 = normal, 2 = an octave up, 0.5 = an octave down) of the music currently playing, in the range 0.5..2.
music_pitch(pitch)| Name | Type |
|---|---|
pitch | real |
Nothing.
Sets the pitch (1 = normal, 2 = an octave up, 0.5 = an octave down) of the music currently playing, in the range 0.5..2. A no-op while nothing is playing.
Independent of music_tempo - a tracker song can genuinely change pitch without changing speed, unlike a sound effect's single speed knob (sound_speed). Resets to 1 the instant music_play/music_fade_to next starts a different song - call it again after every song change if a project wants the effect to persist.
music_play(song_doc_theme, true, 1);
music_pitch(0.85);Starts the theme and immediately drops its pitch slightly - the tempo (how fast it plays) is untouched, only how high or low it sounds.
A no-op while nothing is playing. Independent of music_tempo - a tracker song can genuinely change pitch without changing speed, unlike a sound effect’s single speed knob (sound_speed). Resets to 1 the instant music_play/music_fade_to next starts a DIFFERENT song - re-call this after every song change if a project wants the effect to persist.